package com.liuzh.kaoyanspringboot.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.liuzh.kaoyanspringboot.entity.Comment;
import com.liuzh.kaoyanspringboot.entity.Message;
import com.baomidou.mybatisplus.extension.service.IService;
import com.liuzh.kaoyanspringboot.entity.User;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 刘志鸿
 * @since 2023-03-22
 */
public interface MessageService extends IService<Message> {

    Integer getNewsByUserId(Integer userId);

    Message createAndSave(Integer senderId,Integer recipientId, String type, Integer replyId, String description);

    void createComment(Comment comment);

    Page<Message> findPage(Page<Message> page, String SNickname,String RNickname, String type);

    List<Comment> findReplyComment();

    List<Message> findByIsNew(boolean isNew, String SNickname, String RNickname, String type);

    boolean oldBatchByIds(List<Integer> ids);

    List<User> concernMe(Integer userId);
}
